package edu.whut.mall.portal.service;

import edu.whut.mall.portal.domain.ShippingParams;
import edu.whut.mall.portal.vo.ShippingVo;

import java.util.List;

/**
* @program: d9lab-mall
* @description: 收货地址功能接口
* @author:  Wayne
* @create: Thu May 21 15:18:17 CST 2020
**/

public interface IShippingService {
    /**
     * 新增一個收货地址
     *
     * @param shippingParams
     * @return
     */
    Integer insertOneShipping(ShippingParams shippingParams);

    /**
     * 更新收货地址
     *
     * @param shippingParams
     * @return
     */
    Integer updateOneShipping(ShippingParams shippingParams);

    /**
     * 根据用户id来查出所有收获地址
     * @param userId
     * @return
     */
    List<ShippingVo> listShippingVosByUserId(Long userId);

    /**
     * 根据ShippingId来删除收获地址
     * @param shippingId
     * @return
     */
    Integer deleteOneShipping(Long shippingId);

    /**
     * 根据shippingId设为默认地址
     * @param userId
     * @param shippingId
     * @return
     */
    Integer setDefaultShipping(Long userId, Long shippingId);

    /**
     * 未发货时修改地址
     * @param orderNo
     * @param username
     * @param phone
     * @param receiveAddress
     * @return
     */
    Integer modifyShippingAddress(String orderNo, String username, String phone, String receiveAddress);
}

